hidapi/windows: fixed PS4 controllers over Bluetooth on Windows 7#578
hidapi/windows: fixed PS4 controllers over Bluetooth on Windows 7#578slouken wants to merge 2 commits intolibusb:masterfrom
Conversation
a0b7394 to
4f7de87
Compare
| static int hid_write_output_report(hid_device *dev, const unsigned char *data, size_t length) | ||
| { | ||
| BOOL res; | ||
| res = HidD_SetOutputReport(dev->device_handle, (void *)data, (ULONG)length); |
There was a problem hiding this comment.
please see #224
I'm confident we need to do the same thing for HidD_SetOutputReport as well.
There was a problem hiding this comment.
@slouken It seems, you missed to respond to this question
There was a problem hiding this comment.
It looks like #224 was just pre-allocating the buffer. Were you referring to another change that made sure the buffer size matched feature_report_length? I think, but I'm not sure, that the feature_report_length is the wrong size in this case.
There was a problem hiding this comment.
I mean that the buffer size has to be at least output_report_length bytes in size.
If user passes less data - logically it is not a proble, but WinAPI implementation is known to crash if bufer is too small.
The workaround (as in #224) is to pre-allocate buffer that is large-enough if needed.
|
Sorry to ping. |
4f7de87 to
4cd8137
Compare
|
Okay, I've updated the PR with your suggestions. |
Signed-off-by: Sam Lantinga <slouken@libsdl.org>
4cd8137 to
bf1d2ae
Compare
…over-Bluetooth-.patch
|
Now that Windows 7 has been out of support for a while, I am not so sure if we still care about Windows 7 or not, if this issue is only specific to Windows 7. https://learn.microsoft.com/en-us/lifecycle/products/windows-7
|
|
On the other hand, #513 does not seem to be related to Windows 7. |
No description provided.